<?php


function widgets_upgrade($version_base, $version_ini)
{
	include_once $GLOBALS['babInstallPath'].'utilit/eventincl.php';
	require_once $GLOBALS['babAddonPhpPath'] . 'widgets.php';
	Func_Widgets::register();
	
	bab_addEventListener('bab_eventBeforePageCreated' ,'widget_onBeforePageCreated' ,'addons/widgets/init.php' , 'widgets');
	
	return true;
}


function widget_onBeforePageCreated($event)
{
	require_once $GLOBALS['babAddonPhpPath'] . 'widgets.php';
	Func_Widgets::onBeforePageCreated();
}
